﻿
Imports System.Threading.Tasks
Imports System.Windows.Forms
Imports AutoClient.dllLib


''' <summary>
''' 提示是否有更新页面      
''' </summary>
''' <remarks></remarks>
Public Class DownloadConfirm
    Inherits Form

#Region "窗体申明变量"

    Private _appFrom1 As String
    Private _appName1 As String

#End Region
    Public Sub New()
        InitializeComponent()

    End Sub


#Region "窗体自定义参数及属性"

#End Region
#Region "窗体自定义函数及事件"

#End Region
    ''' <summary>
    ''' 授权版本来源说明       
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Property AppFrom As String 
        Get
            Return _appFrom1
        End Get
        Set(value As String)
            _appFrom1 = value
        End Set
    End Property
    ''' <summary>
    ''' 应用程序名称      
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Property AppName As String 
        Get
            Return _appName1
        End Get
        Set(value As String)
            _appName1 = value
        End Set
    End Property

    Private Sub DownloadConfirm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        lblAppName.Text = _appName1 '2018.2.26
        lblAppFrom.Text = _appFrom1 '程序来源 2018.2.26
    End Sub

    Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click

    End Sub

    Private Sub btnOk_Click(sender As Object, e As EventArgs) Handles btnOk.Click
        Try
            Dim dlg As New DownloadProgress
            With dlg
                .ShowDialog()
                .Dispose()
            End With
        Catch ex As Exception

        End Try
    End Sub

    '    Private Async Function GetServerVersionAsync() As Task(Of String)
    '        ' 更改后的服务器版本文件URL
    '        Dim versionUrl As String = "http://191.168.76.190/update/version.txt"
    '        Using client As New WebClient()
    '         ‘   Return Await client.DownloadStringTaskAsync(versionUrl).ConfigureAwait(False)
    '        End Using
    '    End Function

End Class
